<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of komentarFormclass
 *
 * @author user
 */
class userKomentarKonsultasiForm extends BasekomentarKonsultasiForm {
    public function configure() {
        $this->useFields(array('id_konsultasi', 'id_user', 'isi'));

        $this->widgetSchema['id_konsultasi'] = new sfWidgetFormInputHidden();
        $this->widgetSchema['id_user'] = new sfWidgetFormInputHidden();

        $this->widgetSchema['isi'] = new sfWidgetFormTextarea();

        $this->validatorSchema['isi'] = new sfValidatorAnd(
            array(
                $this->validatorSchema['isi'],
                new sfValidatorString(
                    array(
                        'trim' => true
                    )
                )
            ),
            array(),
            array('required'=>'Komentar harus diisi')
        );
    }

    public function setKonsultasiAndUser($id_konsultasi, $id_user) {
        $this->setDefault('id_konsultasi', $id_konsultasi);
        $this->setDefault('id_user', $id_user);
    }
}
?>
